home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC]
/
NeXTSTEP 3.3 Dev Intel.iso
/
NextDeveloper
/
Headers
/
bsd
/
arpa
/
i386
/
nameser.h
Wrap
Text File
|
1992-04-23
|
2KB
|
45 lines
/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved.
*
* File: bsd/arpa/i386/nameser.h
*
* i386 dependant name server data structures.
*/
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* @(#)nameser.h 5.17 (Berkeley) 11/17/87
*/
/*
* Structure for query header, the order of the fields is machine and
* compiler dependent, in our case, the bits within a byte are assignd
* least significant first, while the order of transmition is most
* significant first. This requires a somewhat confusing rearrangement.
*/
typedef struct {
u_short id; /* query identification number */
/* Bit zero on right: VAX */
/* fields in third byte */
u_char rd:1; /* recursion desired */
u_char tc:1; /* truncated message */
u_char aa:1; /* authoritive answer */
u_char opcode:4; /* purpose of message */
u_char qr:1; /* response flag */
/* fields in fourth byte */
u_char rcode:4; /* response code */
u_char unused:2; /* unused bits */
u_char pr:1; /* primary server required (non standard) */
u_char ra:1; /* recursion available */
/* remaining bytes */
u_short qdcount; /* number of question entries */
u_short ancount; /* number of answer entries */
u_short nscount; /* number of authority entries */
u_short arcount; /* number of resource entries */
} HEADER;